#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<vector>
using namespace std;
bool canPartition(vector<int>& nums) {
	int dp[20000] = { 0 };
	int val[210] = { 0 };
	int n = nums.size();
	int half_val = 0;
	int i = 0, j = 0;
	for (i = 0; i < n; i++) {
		val[i] = nums[i];
		half_val += nums[i];
	}
	int total_val = half_val;
	half_val /= 2;
	if (half_val * 2 != total_val) return false;
	for (i = 0; i < n; i++) {
		for (j = half_val; j >= val[i]; j--) {
			dp[j] = max(dp[j], dp[j - val[i]] + val[i]);
		}
	}
	if (dp[half_val] == half_val) return true;
	else return false;
}
int main()
{
	int n;
	vector<int> nums;
	while (cin >> n) {
		nums.push_back(n);
		if (cin.get() == '\n') break;
	}
	cout << canPartition(nums);
	return 0;
}